﻿using OnDash.Windowing.GraphicsLibraryFramework.Enums;

namespace OnDash.Windowing.Desktop.Events;

public readonly struct KeyboardKeyEventArgs(Keys key, int scanCode, KeyModifiers modifiers, bool isRepeat)
{
    public Keys Key { get; } = key;
    public int ScanCode { get; } = scanCode;
    public KeyModifiers Modifiers { get; } = modifiers;
    public bool IsRepeat { get; } = isRepeat;


    public bool Alt => Modifiers.HasFlag(KeyModifiers.Alt);
    public bool Control => Modifiers.HasFlag(KeyModifiers.Control);
    public bool Shift => Modifiers.HasFlag(KeyModifiers.Shift);
    public bool Command => Modifiers.HasFlag(KeyModifiers.Super);
}